#!/bin/sh

if [ "$#" -ne 2 ] ; then
    echo "Usage: $0 file1.eps file2.eps"
    exit 1
fi

suffix='0a8baf61-6321-4899-86e8-8bf9ebd002b3'

sed 's/\r$/<CR>/; s/$/<LF>/; s/\r/<CR>\n/g' < "$1" > "$1.$suffix"
sed 's/\r$/<CR>/; s/$/<LF>/; s/\r/<CR>\n/g' < "$2" > "$2.$suffix"

diff -a -u "$1.$suffix" "$2.$suffix"
exitcode="$?"

rm -f "$1.$suffix" "$2.$suffix"

exit "$exitcode"
